<?php

use yii\db\Migration;
use yii\db\Schema;

class m170612_013017_add_field_leader extends Migration
{
    public function up()
    {
         $this->addColumn('{{leader}}', 'passport_img', Schema::TYPE_STRING. "(255) null COMMENT '护照图片' ");
         $this->addColumn('{{leader}}', 'passport_grant', Schema::TYPE_DATETIME. " null COMMENT '护照签发日期' ");   
         $this->addColumn('{{leader}}', 'native', Schema::TYPE_STRING. "(64) null COMMENT '出生地' ");
    }

    public function down()
    {
        echo "m170612_013017_add_field_leader cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
